<template>
  <div id="app">

    <Navigation />

    <input type="checkbox" id="menu-toggle" />
    <label for="menu-toggle"><i class="fas fa-times"></i>
      <i class="fas fa-bars"></i>
    </label>
    <router-view />
    <footer>底部</footer>
  </div>
</template>

<script>
// @ is an alias to /src
import Navigation from '@/components/Navigation.vue'

export default {
  name: 'App',
  components: {
    Navigation
  },
  mounted() {
    const script = document.createElement('script');
    script.src = 'https://kit.fontawesome.com/0786c5feec.js';
    script.async = true;
    script.crossOrigin = 'anonymous';
    document.body.appendChild(script);
  }
}
</script>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
